import React, { memo } from 'react';
import { SearchUserWrapper, ItemWrapper } from './style';
import {formatImg} from '@/utils/format'
export default memo(function SearchUser(props) {
  const {list} = props
  return (
    <SearchUserWrapper>
      {
        list.map(item => {
          return (
            <ItemWrapper key={item.userId} isMan={item.gender+'' === '1'}>
              <img src={formatImg(item.avatarUrl, 50)} alt="" />
              <div className="mask sprite_covor"></div>
              <div className="name">
                <span className='link'>{item.nickname}</span>
                <div className="intro">{item.signature || ''}</div>
              </div>
              <div className="btn sprite_button2">关注</div>
              <div className="playlist">歌单：0</div>
              <div className="fans">粉丝：0</div>
            </ItemWrapper>
          )
        })
      }
    </SearchUserWrapper>
  )
});
